/*
 * Copyright © 2017 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
*/

$general-font-color: #333333;
$lighter-font-color: #999999;
$rule-actions-color: #0099ff;
$table_row_border_color: #cccccc;
$drop_container_bg_color: #f5f5f5;

.rules-container {
  font-size: 14px;
  color: $general-font-color;

  .rules {

    .row {
      padding: 10px 0;
      border-bottom: 1px solid $table_row_border_color;

      &:first-child {
        border-top: 1px solid $table_row_border_color;
      }

      &.dragging {
        opacity: 0;
      }

      .remove-button,
      .move-icon {
        color: $lighter-font-color;

        &:hover {
          color: $rule-actions-color;
          text-decoration: underline;
        }
      }
      .remove-button {
        font-size: 12px;
        line-height: 1;
      }

      .move-icon {
        cursor: move;
      }
    }
    .drag-drop-placeholder {
      margin-left: -15px;
      margin-right: -15px;
      padding: 10px 0;
      text-align: center;
      border: 2px dashed $table_row_border_color;
      margin-top: 20px;
      color: $rule-actions-color;
      font-weight: bold;
    }
  }

  &.drag-hover {
    border: 4px dashed $rule-actions-color;
    background: $drop_container_bg_color;
    position: relative;
    padding: 15px;
    margin-top: 10px;

    .drag-drop-placeholder {
      display: none;
    }
    &:after {
      content: 'Drag and Drop a rule to add it to this rulebook';
      position: absolute;
      left: 30%;
      font-size: 20px;
      top: 0;
      color: $rule-actions-color;
      opacity: 0.5;
    }
  }

  .title {
    font-weight: 700;
    margin-bottom: 10px;
  }
  .btn-link {
    &:focus,
    &:active,
    &:hover {
      outline: none;
      background: transparent;
      text-decoration: none;
    }
    color: $rule-actions-color;
    cursor: pointer;
    padding: 0;
  }
}
